module.exports = plop => {
  plop.setGenerator('component', {
    description: 'create a component',
    prompts: [{
      type: 'input',
      name: 'name',
      message: 'component name',
      default: 'IComponent',
    }],
    actions: [{
      type: 'add',
      path: 'src/components/{{name}}.vue',
      templateFile: 'plop-templates/component.hbs',
    }, {
      type: 'add',
      path: 'tests/unit/{{name}}.js',
      templateFile: 'plop-templates/test.hbs',
    }],
  })
};